﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using TOrderID = System.Int32;
using TConsumptionRecdID = System.Int64;
using TConsumptionTreeID = System.Int32;

namespace DatabaseAgency
{
    /// <summary>
    /// 服务器对客户端(酒店下单终端, 工程部终端)的消息推送通过这个接口传递
    /// </summary>
    public interface IPushMessage
    {
        /// <summary>
        /// 通知客户端需要更新这些id的报修单数据
        /// </summary>
        /// <param name="ids"></param>
        void UpdateOrders(List<TOrderID> ids);

        /// <summary>
        /// 通知客户端需要增加这些id的报修单
        /// </summary>
        /// <param name="ids"></param>
        void AddOrders(List<TOrderID> ids);

        /// <summary>
        /// 通知客户端需要删除这些报修单
        /// </summary>
        /// <param name="ids"></param>
        void DeleteOrders(List<TOrderID> ids);

        /// <summary>
        /// 通知客户端需要更新酒店信息
        /// </summary>
        void UpdateHotelInfo(HotelInfoType hotelInfoType);

        /// <summary>
        /// 强制用户退出登录, 原因很多, 可能是异处登录, 服务器维护等
        /// </summary>
        /// <param name="reason">强制退出登录的原因</param>
        void ForceLogOut(string reason);
    }

    /// <summary>
    /// 酒店信息变更的种类
    /// </summary>
    public enum HotelInfoType
    {
        HotelTerminal, 
        EngineerDept
    }
}
